<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <img src="" alt="">
    

    <script src="./jquery-3.7.1.js"></script>
    <script>
        $.ajax({
            type:"get",
            url:"https://api.thecatapi.com/v1/images/search",
            data:{
                size:"full"
            },
            dataType:"json",//表示数据格式是JSON
            success:function(res){
                console.log(res);
                $("img").attr("src",res[0].url);
            }
        })

    </script>
</body>
</html>